package com.cats.template.sys.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cats.template.sys.pojo.model.UserModel;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @author duxiaobo
 * @date 2021/9/102:34 下午
 */
@Mapper
public interface UserMapper extends BaseMapper<UserModel> {

    @Select("select * from sys_user where user_name = #{userName} and delete_flg = 0")
    UserModel getUserByUserName(@Param("userName") String userName);

    @Select("select * from sys_user where user_name = #{userName} and password = #{password} and delete_flg = 0")
    UserModel getUserByUserNameAndPassword(@Param("userName") String userName, @Param("password") String password);
}
